import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {OutpatientpayComponent} from './outpatientpay/outpatientpay.component';
import {PhomepageComponent} from './phomepage/phomepage.component';
import {DoctorhomeComponent} from './doctorhome/doctorhome.component';

const routes: Routes = [
  {
    path: '',
    redirectTo: 'hospinfo',
    pathMatch: 'full'
  },
  // 医院信息模块懒加载
  {
    path: 'hospinfo',
    loadChildren: './hospinfo/hospinfo.module#HospInfoModule'
  },
  //预约挂号模块懒加载
  {
    path: 'appoint',
    loadChildren: './appoint/appoint.module#AppointModule'
  },
  //就诊人模块
  {
    path: 'patient',
    loadChildren: './patient/patient.module#PatientModule'
  },
  //预约记录模块
  {
    path: 'appointrecord',
    loadChildren: './appointrecord/appointrecord.module#AppointRecordModule'
  },
  //检验检查模块
  {
    path: 'inspectionrecord',
    loadChildren: './inspectionrecord/inspectionrecord.module#InspectionRecordModule'
  },
  //就医记录模块
  {
    path: 'medicalrecord',
    loadChildren: './medicalrecord/medicalrecord.module#MedicalRecordModule'
  },
  //缴费记录模块
  {
    path: 'outpatientpayrecord',
    loadChildren: './outpatientpayrecord/outpatientpayrecord.module#OutpatientpayRecordModule'
  },
  {
    path: 'outpatientpay',
    component: OutpatientpayComponent
  },
  {
    path: 'homepage',
    component: PhomepageComponent
  },
  {
    path: 'doctorhome',
    component: DoctorhomeComponent
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
